package es.albarregas.pruebas;

public class CrearPatron {


	public   static String crearPatronMayusculasMinusculas(String cadena) {
		String cadenaMayusculas=cadena.toUpperCase();
		String cadenaMinusculas=cadena.toLowerCase();
		String patron="";
		for (int i = 0; i < cadena.length(); i++) {
			patron+="["+cadenaMayusculas.charAt(i)+cadenaMinusculas.charAt(i)+"]";
		}
		
		
		return patron;
	}
	public static void main(String[] args) {
		String cadena="ASDFASFD HOLA ASDF";
		String patron=crearPatronMayusculasMinusculas("FD");
		
		System.out.println("PATRON"+patron);
		System.out.println(cadena.replaceAll(patron, "xxxxx"));
		

	}

}
